<me:UIWDECK x:Class="WPFExcelReport.TWDECK"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
     xmlns:me="clr-namespace:WPFExcelReport"
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
     xmlns:PR="clr-namespace:WPFExcelReport;assembly=TICC_PRULES"  
     xmlns:MU="clr-namespace:WPFExcelReport;assembly=TABAUFM"  
    xmlns:ABK="clr-namespace:WPFExcelReport;assembly=TABKOPF"   
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UIWDECK.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWDECK.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <WrapPanel Grid.Row="0">
            <Grid Margin="10,0,0,0" VerticalAlignment="Top" 
                  Visibility="{Binding IsOrder,ElementName=TV,Converter={StaticResource ResourceKey=bv}}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button Click="OrderCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Extend.png" />
                    </Button.Background>
                </Button>
                <TextBlock Grid.Column="1" Text="{Binding Source={Localization:Translate Word=供应}}"  ></TextBlock>
            </Grid>
            <Grid Margin="10,0,0,0" Grid.Column="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=需求:}}" ></TextBlock>
                <TextBlock  Grid.Column="1" Text="{Binding WDBEDARF,Source={StaticResource vwMaster}, Converter={StaticResource d100}}" MinWidth="60" />
                <TextBlock Grid.Column="2" Text="{Binding Source={Localization:Translate Word=留位:}}" ></TextBlock>
                <TextBlock  Grid.Column="3" Text="{Binding WDZUGET,Source={StaticResource vwMaster}, Converter={StaticResource d100}}" MinWidth="60" />
            </Grid>
            <Grid Margin="10,0,0,0" Grid.Column="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=预留:}}" ></TextBlock>
                <TextBlock  Grid.Column="3" Text="{Binding WDRESERV,Source={StaticResource vwMaster}, Converter={StaticResource d100}}" MinWidth="60"  />
            </Grid>
            <Grid Margin="10,0,0,0" Grid.Column="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=差异:}}" ></TextBlock>
                <TextBlock  Grid.Column="1" Foreground="Red" Text="{Binding TOLOCK,ElementName=TV, Converter={StaticResource d100}}" MinWidth="60"  />
            </Grid>
        </WrapPanel> 
    </Grid>
</me:UIWDECK>
